package me.lensfrex.trailblazer.api.v1.utils;

public class InputChecker {

    public static boolean hasInvalidChar(String input) {
        char[] source = input.toCharArray();
        for (char c : source) {
            if (!((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') ||
                    (c >= '0' && c <= '9'))) {
                return true;
            }
        }

        return false;
    }

    public static boolean hasInvisibleChar(String input) {
        char[] source = input.toCharArray();
        for (char c : source) {
            if (!(c >= ' ' && c <= '~')) {
                return true;
            }
        }

        return false;
    }
}
